package com.kzd.sdk.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.Gson;

import java.io.Serializable;

public class KZD_SdkRoleParams implements Parcelable {

    private String smallId;//小号id
    private String roleName;//角色名
    private String roleId;//角色id
    private String roleLevel;//角色等级
    private String gameName;//游戏名
    private String serverId;//服务器id
    private String serverName;//服务器名

    protected KZD_SdkRoleParams(Parcel in) {
        smallId = in.readString();
        roleName = in.readString();
        roleId = in.readString();
        roleLevel = in.readString();
        gameName = in.readString();
        serverId = in.readString();
        serverName = in.readString();
    }

    public KZD_SdkRoleParams(
            String smallId, String roleName, String roleId, String roleLevel, String gameName, String serverId, String serverName
    ) {
        this.smallId = smallId;//小号id
        this.roleName = roleName;//角色名
        this.roleId = roleId;//角色id
        this.roleLevel = roleLevel;//角色等级
        this.gameName = gameName;//游戏名
        this.serverId = serverId;//服务器id
        this.serverName = serverName;//服务器名
    }

    public KZD_SdkRoleParams(){}

    public static final Creator<KZD_SdkRoleParams> CREATOR = new Creator<KZD_SdkRoleParams>() {
        @Override
        public KZD_SdkRoleParams createFromParcel(Parcel in) {
            return new KZD_SdkRoleParams(in);
        }

        @Override
        public KZD_SdkRoleParams[] newArray(int size) {
            return new KZD_SdkRoleParams[size];
        }
    };

    public String getSmallId() {
        return smallId;
    }

    public void setSmallId(String smallId) {
        this.smallId = smallId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleLevel() {
        return roleLevel;
    }

    public void setRoleLevel(String roleLevel) {
        this.roleLevel = roleLevel;
    }

    public String getGameName() {
        return gameName;
    }

    public void setGameName(String gameName) {
        this.gameName = gameName;
    }

    public String getServerId() {
        return serverId;
    }

    public void setServerId(String serverId) {
        this.serverId = serverId;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(smallId);
        dest.writeString(roleName);
        dest.writeString(roleId);
        dest.writeString(roleLevel);
        dest.writeString(gameName);
        dest.writeString(serverId);
        dest.writeString(serverName);
    }
}
